home *** CD-ROM | disk | FTP | other *** search
/ Isometric Game Programming with DirectX 7.0 / Isometric Game Programming.iso / source / chapter16 / isohex16_3 / isohexdefs.h < prev    next >
C/C++ Source or Header  |  2000-07-24  |  936b  |  40 lines

  1. ////////////////////////////////////////////////////////////
  2. //IsoHexDefs.h
  3. //24JUL2000
  4. //Ernest S. Pazera
  5. //fundamental enumerations for use with the IsoHexCore engine
  6. ////////////////////////////////////////////////////////////
  7. #ifndef __ISOHEXDEFS_H__
  8. #define __ISOHEXDEFS_H__
  9.  
  10. ////////////////////////////////////////////////////////////
  11. //Enumerations
  12. ////////////////////////////////////////////////////////////
  13.  
  14. //the isometric directions
  15. typedef enum
  16. {
  17.     ISO_NORTH=0,
  18.     ISO_NORTHEAST=1,
  19.     ISO_EAST=2,
  20.     ISO_SOUTHEAST=3,
  21.     ISO_SOUTH=4,
  22.     ISO_SOUTHWEST=5,
  23.     ISO_WEST=6,
  24.     ISO_NORTHWEST=7
  25. } ISODIRECTION;
  26.  
  27. //directional turning macros
  28. #define ISO_TURNRIGHT(dir,turn) (ISODIRECTION)(((int)(dir)+(turn))&7)
  29. #define ISO_TURNLEFT(dir,turn) (ISODIRECTION)(((int)(dir)+(turn)*7)&7)
  30.  
  31. //iso map types
  32. typedef enum
  33. {
  34.     ISOMAP_SLIDE,
  35.     ISOMAP_STAGGERED,
  36.     ISOMAP_DIAMOND,
  37.     ISOMAP_RECTANGULAR
  38. } ISOMAPTYPE;
  39.  
  40. #endif